<!DOCTYPE html> 
<html> 
<?php
	include "DBProperties.php";
	
	if(isset($_GET['u_id']))
	{
		connectToSQL();
		timeStampUpdate($_GET['u_id']);
		closeConnection();
	}
	
	function timeStampUpdate( $U_ID )
	{
		global $databaseName, $connection, $codetable;
		mysql_select_db($databaseName, $connection);
		
		$sqlString = "SELECT * FROM users WHERE Unique_ID = ".$U_ID."";
		$results = mysql_query($sqlString);
		$row = mysql_num_rows($results);
		
		if($row > 0)
		{
			$sqlString = "UPDATE users SET Last_Log=NOW() WHERE Unique_ID = ".$U_ID."";
			mysql_query($sqlString);
		}
		else
		{
			$sqlString = "INSERT INTO users (Unique_ID) VALUES (".$U_ID.")";
			mysql_query($sqlString);
		}
	}
?>
<head> 
<link rel="stylesheet" type="text/css" href="dummyStyle.css"/>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> 
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> 
<title>Jam Dodge (Tracking)</title> 
<script type="text/javascript" 
  src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript" 
  src="http://jam-dodge.enox.co.za/jamdodge.js"></script>
</head>
<body onload="initialize()">
  <div id="map_canvas"></div> 
</body> 

</body>
